package com.systemsjr.jrbbf.expense;

import com.systemsjr.jrbbf.common.FinanceEntity;

public class ExpenseType extends FinanceEntity{
	
	private String code;
	private String expenseType;
	
	public ExpenseType(int id, String code, String expenseType){		
		this.id = id;
		this.code = code;
		this.expenseType = expenseType;
	}
	
	public ExpenseType(String code, String expenseType){	
		this.code = code;
		this.expenseType = expenseType;
	}
	public ExpenseType(){
		this.code = "";
		this.expenseType = "";
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getExpenseType() {
		return expenseType;
	}
	public void setExpenseType(String expenseType) {
		this.expenseType = expenseType;
	}

	public boolean equals(Object obj) {
		
		if(this.code.equalsIgnoreCase(((ExpenseType)obj).code) && this.expenseType.equalsIgnoreCase(((ExpenseType)obj).expenseType)){
			return true;
		}
		return false;
	}
	
	public String toString(){
		return expenseType;
	}
}
